home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / lib_std / std_input.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  961 b   |  48 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class STD_INPUT
  5. --
  6. -- To use the standard input file. As for UNIX, the default standard 
  7. -- input is the keyboard.
  8. --
  9. -- Notes : - the predefined `std_input' should be use to have only 
  10. --         one instance of the class STD_INPUT. 
  11. --         - to do reading or writing at the same time on the screen, 
  12. --         see STD_INPUT_OUTPUT,
  13. --         - to handle cursor of the screen, see CURSES.
  14. --
  15.    
  16. inherit 
  17.    STD_FILE_READ 
  18.       redefine make, disconnect 
  19.       end;
  20.    
  21. creation {ANY}
  22.    make, connect_to
  23.  
  24. feature {ANY}
  25.    
  26.    make is
  27.       do
  28.      input_stream := stdin;
  29.       end;
  30.    
  31.    disconnect is      
  32.       local
  33.      err: INTEGER;
  34.       do
  35.      err := fclose(input_stream); 
  36.      path := Void;
  37.      input_stream := stdin;
  38.       end;
  39.       
  40. feature {NONE} 
  41.    
  42.    stdin: POINTER is
  43.       external "CSE"
  44.       end;
  45.  
  46. end -- STD_INPUT
  47.  
  48.